package com.snopy.jvm.stack;

import java.io.Serializable;
import java.nio.charset.StandardCharsets;

/**
 * @author snopy
 * @version 1.0.0
 * @classname DemoMethodFrame
 * @description more precisely
 * @email 77912204@qq.com
 * @date 2022/07/08 7:06
 */
public class DemoMethodFrame implements Serializable {

    private String name;
    private String addr;
    private String realname;
    private String nickname;
    private String email;
    private String gender;
    private Double salary;
    private byte age;

    public DemoMethodFrame() {
    }

    public DemoMethodFrame(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public byte getAge() {
        return age;
    }

    public void setAge(byte age) {
        this.age = age;
    }

    public static void main(String[] args) {
        DemoMethodFrame sss = new DemoMethodFrame("sss");
        sss.methodA();
    }
    private void methodA(){
        methodB();
    }
    private void methodB(){
        int i = methodC(this.name);
        System.out.println(i);
    }
    private int methodC(String name){
        String s = methodD()+name;
        return s.getBytes(StandardCharsets.UTF_8).length;
    }
    private String methodD(){
        return String.valueOf(System.nanoTime()+("123"+("123"+"123")+"123"));
    }
}
